include $(TOPDIR)/core/config/env.mk

USE_LIBC = yes
USE_NANO = yes

#	#if defined(__LOG_UART__)
#		LOG_PRINTF output to debug uart
#	#elif defined(__LOG_ACAT__)
#		LOG_PRINTF output to catstudio
CFLAGS += -D__LOG_UART__
EXTRA_INC +=
EXTRA_LIBS +=

SRCS = \
	main.c

include $(TOPDIR)/core/mbedtls/mbedtls.mak

SDK_INC += .\
		LinkSDK\core	\
		LinkSDK\core\utils	\
		LinkSDK\core\sysdep	\
		LinkSDK\components\dynreg	\
		LinkSDK\components\dynreg-mqtt

SRCS += atcmds.c \
		dtu_mqtt.c \
		dtu_socket.c

SRCS += LinkSDK/demos/mqtt_basic_demo.c
SRCS += LinkSDK/demos/dynreg_basic_demo.c
SRCS += LinkSDK/demos/dynregmq_basic_demo.c \
				LinkSDK/components/dynreg-mqtt/aiot_dynregmq_api.c	

SRCS += LinkSDK/components/dynreg/aiot_dynreg_api.c

SRCS += LinkSDK/external/ali_ca_cert.c

SRCS += LinkSDK/core/aiot_mqtt_api.c \
			LinkSDK/core/aiot_state_api.c \
			LinkSDK/core/sysdep/core_sysdep.c \
			LinkSDK/core/sysdep/core_adapter.c \
			LinkSDK/core/utils/core_auth.c \
			LinkSDK/core/utils/core_diag.c \
			LinkSDK/core/utils/core_global.c \
			LinkSDK/core/utils/core_http.c \
			LinkSDK/core/utils/core_log.c \
			LinkSDK/core/utils/core_sha256.c \
			LinkSDK/core/utils/core_string.c \
			LinkSDK/portfiles/aiot_port/freertos_port.c

include $(TOPDIR)/core/config/rules.mk